/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 28 2007)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "Gimbo_forms.h"

///////////////////////////////////////////////////////////////////////////

LoaderFrame::LoaderFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	this->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Sans") ) );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_splitter2 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
	m_splitter2->SetSashGravity( 1 );
	m_splitter2->Connect( wxEVT_IDLE, wxIdleEventHandler( LoaderFrame::m_splitter2OnIdle ), NULL, this );
	m_panel7 = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	m_splitter1 = new wxSplitterWindow( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
	m_splitter1->SetSashGravity( 1 );
	m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( LoaderFrame::m_splitter1OnIdle ), NULL, this );
	ServicePanel = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText7 = new wxStaticText( ServicePanel, wxID_ANY, wxT("Services"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	bSizer2->Add( m_staticText7, 0, wxALL, 5 );
	
	notebook_TreeCtrls = new wxNotebook( ServicePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxT("Tabs") );
	panel_Clients = new wxPanel( notebook_TreeCtrls, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, wxT("Clients") );
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_Clients = new wxTreeCtrl( panel_Clients, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_MULTIPLE );
	bSizer4->Add( treeCtrl_Clients, 1, wxALL|wxEXPAND, 5 );
	
	panel_Clients->SetSizer( bSizer4 );
	panel_Clients->Layout();
	bSizer4->Fit( panel_Clients );
	notebook_TreeCtrls->AddPage( panel_Clients, wxT("Clients"), false );
	panel_Types = new wxPanel( notebook_TreeCtrls, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_Types = new wxTreeCtrl( panel_Types, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_MULTIPLE );
	bSizer7->Add( treeCtrl_Types, 1, wxALL|wxEXPAND, 5 );
	
	panel_Types->SetSizer( bSizer7 );
	panel_Types->Layout();
	bSizer7->Fit( panel_Types );
	notebook_TreeCtrls->AddPage( panel_Types, wxT("Services"), false );
	panel_Locations = new wxPanel( notebook_TreeCtrls, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	panel_Locations->Hide();
	
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_Locations = new wxTreeCtrl( panel_Locations, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_MULTIPLE );
	bSizer8->Add( treeCtrl_Locations, 1, wxALL|wxEXPAND, 5 );
	
	panel_Locations->SetSizer( bSizer8 );
	panel_Locations->Layout();
	bSizer8->Fit( panel_Locations );
	notebook_TreeCtrls->AddPage( panel_Locations, wxT("Locations"), false );
	panel_MaCI = new wxPanel( notebook_TreeCtrls, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_MaCI = new wxTreeCtrl( panel_MaCI, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_MULTIPLE );
	bSizer11->Add( treeCtrl_MaCI, 1, wxALL|wxEXPAND, 5 );
	
	panel_MaCI->SetSizer( bSizer11 );
	panel_MaCI->Layout();
	bSizer11->Fit( panel_MaCI );
	notebook_TreeCtrls->AddPage( panel_MaCI, wxT("MaCI"), true );
	panel_Sessions = new wxPanel( notebook_TreeCtrls, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer18;
	bSizer18 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_Sessions = new wxTreeCtrl( panel_Sessions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE );
	bSizer18->Add( treeCtrl_Sessions, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer19;
	bSizer19 = new wxBoxSizer( wxHORIZONTAL );
	
	button_StartSession = new wxButton( panel_Sessions, wxID_ANY, wxT("Start"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer19->Add( button_StartSession, 0, wxALL, 5 );
	
	button_UploadSession = new wxButton( panel_Sessions, wxID_ANY, wxT("Upload current..."), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer19->Add( button_UploadSession, 0, wxALL, 5 );
	
	bSizer18->Add( bSizer19, 0, wxEXPAND, 5 );
	
	panel_Sessions->SetSizer( bSizer18 );
	panel_Sessions->Layout();
	bSizer18->Fit( panel_Sessions );
	notebook_TreeCtrls->AddPage( panel_Sessions, wxT("Sessions"), false );
	
	bSizer2->Add( notebook_TreeCtrls, 1, wxEXPAND | wxALL, 5 );
	
	ServicePanel->SetSizer( bSizer2 );
	ServicePanel->Layout();
	bSizer2->Fit( ServicePanel );
	ComponentPanel = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText6 = new wxStaticText( ComponentPanel, wxID_ANY, wxT("Components"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText6->Wrap( -1 );
	bSizer3->Add( m_staticText6, 0, wxALL, 5 );
	
	notebook_Components = new wxNotebook( ComponentPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_panel9 = new wxPanel( notebook_Components, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_Available = new wxTreeCtrl( m_panel9, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT );
	bSizer12->Add( treeCtrl_Available, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxVERTICAL );
	
	button_Load = new wxButton( m_panel9, wxID_ANY, wxT("Load"), wxDefaultPosition, wxDefaultSize, 0 );
	button_Load->Enable( false );
	
	bSizer15->Add( button_Load, 0, wxALL, 5 );
	
	bSizer12->Add( bSizer15, 0, wxEXPAND, 5 );
	
	m_panel9->SetSizer( bSizer12 );
	m_panel9->Layout();
	bSizer12->Fit( m_panel9 );
	notebook_Components->AddPage( m_panel9, wxT("Available"), true );
	m_panel10 = new wxPanel( notebook_Components, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer13;
	bSizer13 = new wxBoxSizer( wxVERTICAL );
	
	treeCtrl_Running = new wxTreeCtrl( m_panel10, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT );
	bSizer13->Add( treeCtrl_Running, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxHORIZONTAL );
	
	button_Terminate = new wxButton( m_panel10, wxID_ANY, wxT("Terminate"), wxDefaultPosition, wxDefaultSize, 0 );
	button_Terminate->Enable( false );
	
	bSizer14->Add( button_Terminate, 0, wxALL, 5 );
	
	button_Assign = new wxButton( m_panel10, wxID_ANY, wxT("Assign services"), wxDefaultPosition, wxDefaultSize, 0 );
	button_Assign->Enable( false );
	
	bSizer14->Add( button_Assign, 0, wxALL, 5 );
	
	bSizer13->Add( bSizer14, 0, wxEXPAND, 5 );
	
	m_panel10->SetSizer( bSizer13 );
	m_panel10->Layout();
	bSizer13->Fit( m_panel10 );
	notebook_Components->AddPage( m_panel10, wxT("Running"), false );
	
	bSizer3->Add( notebook_Components, 1, wxEXPAND | wxALL, 5 );
	
	ComponentPanel->SetSizer( bSizer3 );
	ComponentPanel->Layout();
	bSizer3->Fit( ComponentPanel );
	m_splitter1->SplitVertically( ServicePanel, ComponentPanel, 0 );
	bSizer5->Add( m_splitter1, 3, wxEXPAND, 5 );
	
	wxBoxSizer* ButtonSizer;
	ButtonSizer = new wxBoxSizer( wxHORIZONTAL );
	
	button_Connect = new wxButton( m_panel7, wxID_ANY, wxT("Connect..."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
	ButtonSizer->Add( button_Connect, 0, wxALL, 5 );
	
	button_Ping = new wxButton( m_panel7, wxID_ANY, wxT("Ping"), wxDefaultPosition, wxDefaultSize, 0 );
	button_Ping->Enable( false );
	button_Ping->Hide();
	
	ButtonSizer->Add( button_Ping, 0, wxALL, 5 );
	
	button_Monitor = new wxButton( m_panel7, wxID_ANY, wxT("Traffic monitor"), wxDefaultPosition, wxDefaultSize, 0 );
	button_Monitor->Enable( false );
	button_Monitor->Hide();
	
	ButtonSizer->Add( button_Monitor, 0, wxALL, 5 );
	
	button_Update = new wxButton( m_panel7, wxID_ANY, wxT("Update"), wxDefaultPosition, wxDefaultSize, 0 );
	button_Update->Enable( false );
	button_Update->Hide();
	
	ButtonSizer->Add( button_Update, 0, wxALL, 5 );
	
	
	ButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer5->Add( ButtonSizer, 0, wxEXPAND, 5 );
	
	m_panel7->SetSizer( bSizer5 );
	m_panel7->Layout();
	bSizer5->Fit( m_panel7 );
	panel_Log = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxVERTICAL );
	
	textCtrl_Log = new wxTextCtrl( panel_Log, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
	bSizer6->Add( textCtrl_Log, 1, wxALL|wxEXPAND, 5 );
	
	panel_Log->SetSizer( bSizer6 );
	panel_Log->Layout();
	bSizer6->Fit( panel_Log );
	m_splitter2->SplitHorizontally( m_panel7, panel_Log, 531 );
	bSizer1->Add( m_splitter2, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	m_menubar1 = new wxMenuBar( 0 );
	menu_File = new wxMenu();
	wxMenuItem* menuItem_Load = new wxMenuItem( menu_File, MENUITEM_LOAD, wxString( wxT("Load session...") ) , wxEmptyString, wxITEM_NORMAL );
	menu_File->Append( menuItem_Load );
	wxMenuItem* menuItem_Save = new wxMenuItem( menu_File, wxID_ANY, wxString( wxT("Save current session...") ) , wxEmptyString, wxITEM_NORMAL );
	menu_File->Append( menuItem_Save );
	wxMenuItem* menuItem_Settings = new wxMenuItem( menu_File, MENUITEM_SETTINGS, wxString( wxT("Settings...") ) , wxEmptyString, wxITEM_NORMAL );
	menu_File->Append( menuItem_Settings );
	
	menu_File->AppendSeparator();
	wxMenuItem* menuItem_Exit = new wxMenuItem( menu_File, wxID_EXIT, wxString( wxT("Exit") ) , wxEmptyString, wxITEM_NORMAL );
	menu_File->Append( menuItem_Exit );
	m_menubar1->Append( menu_File, wxT("File") );
	
	menu_GIMI = new wxMenu();
	wxMenuItem* menuItem_Connect = new wxMenuItem( menu_GIMI, MENUITEM_CONNECT, wxString( wxT("Connect...") ) , wxEmptyString, wxITEM_NORMAL );
	menu_GIMI->Append( menuItem_Connect );
	wxMenuItem* menuItem_Update = new wxMenuItem( menu_GIMI, MENUITEM_UPDATE, wxString( wxT("Update") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
	menu_GIMI->Append( menuItem_Update );
	wxMenuItem* menuItem_Ping = new wxMenuItem( menu_GIMI, MENUITEM_PING, wxString( wxT("Ping") ) , wxEmptyString, wxITEM_NORMAL );
	menu_GIMI->Append( menuItem_Ping );
	menuItem_Ping->Enable( false );
	
	m_menubar1->Append( menu_GIMI, wxT("GIMI") );
	
	this->SetMenuBar( m_menubar1 );
	
	statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( LoaderFrame::OnClose ) );
	treeCtrl_Clients->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanged ), NULL, this );
	treeCtrl_Clients->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanging ), NULL, this );
	treeCtrl_Types->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanged ), NULL, this );
	treeCtrl_Types->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanging ), NULL, this );
	treeCtrl_Locations->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanged ), NULL, this );
	treeCtrl_Locations->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanging ), NULL, this );
	treeCtrl_MaCI->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanged ), NULL, this );
	treeCtrl_MaCI->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( LoaderFrame::OnServiceSelectChanging ), NULL, this );
	treeCtrl_Sessions->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnSessionSelected ), NULL, this );
	button_StartSession->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnStartOnlineSession ), NULL, this );
	button_UploadSession->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnUploadSession ), NULL, this );
	treeCtrl_Available->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( LoaderFrame::OnAvailableComponentActivated ), NULL, this );
	treeCtrl_Available->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnAvailableComponentSelectChanged ), NULL, this );
	treeCtrl_Available->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( LoaderFrame::OnAvailableComponentSelectChanging ), NULL, this );
	button_Load->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnLoadComponent ), NULL, this );
	treeCtrl_Running->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( LoaderFrame::OnRunningComponentSelectChanged ), NULL, this );
	treeCtrl_Running->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( LoaderFrame::OnRunningComponentSelectChanging ), NULL, this );
	button_Terminate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnComponentTerminate ), NULL, this );
	button_Assign->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnAssignServices ), NULL, this );
	button_Connect->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnConnect ), NULL, this );
	button_Ping->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnPing ), NULL, this );
	button_Monitor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnMonitor ), NULL, this );
	button_Update->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LoaderFrame::OnUpdate ), NULL, this );
	this->Connect( menuItem_Load->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnLoadSession ) );
	this->Connect( menuItem_Save->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnSaveSession ) );
	this->Connect( menuItem_Settings->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnSettings ) );
	this->Connect( menuItem_Exit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnExit ) );
	this->Connect( menuItem_Connect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnConnect ) );
	this->Connect( menuItem_Update->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnUpdate ) );
	this->Connect( menuItem_Ping->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( LoaderFrame::OnPing ) );
}

ConnectDialog::ConnectDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("Hub:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	fgSizer2->Add( m_staticText12, 0, wxALL, 5 );
	
	comboBox_Hub = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer2->Add( comboBox_Hub, 0, wxALL, 5 );
	
	m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	fgSizer2->Add( m_staticText13, 0, wxALL, 5 );
	
	comboBox_Port = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer2->Add( comboBox_Port, 0, wxALL, 5 );
	
	m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("Own name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText14->Wrap( -1 );
	fgSizer2->Add( m_staticText14, 0, wxALL, 5 );
	
	textCtrl_OwnName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer2->Add( textCtrl_OwnName, 0, wxALL|wxEXPAND, 5 );
	
	bSizer10->Add( fgSizer2, 1, wxEXPAND, 5 );
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1OK = new wxButton( this, wxID_OK );
	m_sdbSizer1->AddButton( m_sdbSizer1OK );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	bSizer10->Add( m_sdbSizer1, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( bSizer10 );
	this->Layout();
	bSizer10->Fit( this );
	
	// Connect Events
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectDialog::OnCancel ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectDialog::OnOK ), NULL, this );
}

SettingsFrame::SettingsFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer21;
	bSizer21 = new wxBoxSizer( wxVERTICAL );
	
	m_notebook3 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_panel11 = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 6, 2, 0, 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	checkBox_Autoconnect = new wxCheckBox( m_panel11, wxID_ANY, wxT("Connect when Gimbo starts"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer3->Add( checkBox_Autoconnect, 0, wxALL, 5 );
	
	
	fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText16 = new wxStaticText( m_panel11, wxID_ANY, wxT("Hub address"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16->Wrap( -1 );
	fgSizer3->Add( m_staticText16, 0, wxALL, 5 );
	
	comboBox_Hub = new wxComboBox( m_panel11, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer3->Add( comboBox_Hub, 0, wxALL, 5 );
	
	m_staticText17 = new wxStaticText( m_panel11, wxID_ANY, wxT("Port"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText17->Wrap( -1 );
	fgSizer3->Add( m_staticText17, 0, wxALL, 5 );
	
	textCtrl_Port = new wxTextCtrl( m_panel11, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( textCtrl_Port, 0, wxALL, 5 );
	
	m_staticText18 = new wxStaticText( m_panel11, wxID_ANY, wxT("My name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText18->Wrap( -1 );
	fgSizer3->Add( m_staticText18, 0, wxALL, 5 );
	
	textCtrl_OwnName = new wxTextCtrl( m_panel11, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( textCtrl_OwnName, 0, wxALL, 5 );
	
	
	fgSizer3->Add( 0, 20, 1, wxEXPAND, 5 );
	
	
	fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText20 = new wxStaticText( m_panel11, wxID_ANY, wxT("Service list refreshing"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText20->Wrap( -1 );
	fgSizer3->Add( m_staticText20, 0, wxALL, 5 );
	
	m_staticText24 = new wxStaticText( m_panel11, wxID_ANY, wxT("Timeout"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText24->Wrap( -1 );
	fgSizer3->Add( m_staticText24, 0, wxALL, 5 );
	
	checkBox_Loop1 = new wxCheckBox( m_panel11, wxID_ANY, wxT("Loop 1"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer3->Add( checkBox_Loop1, 0, wxALL, 5 );
	
	textCtrl_Timeout1 = new wxTextCtrl( m_panel11, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( textCtrl_Timeout1, 0, wxALL, 5 );
	
	checkBox_Loop2 = new wxCheckBox( m_panel11, wxID_ANY, wxT("Loop 2"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer3->Add( checkBox_Loop2, 0, wxALL, 5 );
	
	textCtrl_Timeout2 = new wxTextCtrl( m_panel11, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( textCtrl_Timeout2, 0, wxALL, 5 );
	
	m_panel11->SetSizer( fgSizer3 );
	m_panel11->Layout();
	fgSizer3->Fit( m_panel11 );
	m_notebook3->AddPage( m_panel11, wxT("Connection"), false );
	m_panel12 = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxFlexGridSizer* fgSizer31;
	fgSizer31 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer31->SetFlexibleDirection( wxBOTH );
	fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText11 = new wxStaticText( m_panel12, wxID_ANY, wxT("Components root directory"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText11->Wrap( -1 );
	fgSizer31->Add( m_staticText11, 0, wxALL, 5 );
	
	textCtrl_CompsDir = new wxTextCtrl( m_panel12, wxID_ANY, wxT("./components"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer31->Add( textCtrl_CompsDir, 1, wxALL|wxEXPAND, 5 );
	
	checkBox_TerminateComps = new wxCheckBox( m_panel12, wxID_ANY, wxT("Terminate running components when Gimbo is closed"), wxDefaultPosition, wxDefaultSize, 0 );
	checkBox_TerminateComps->SetValue(true);
	
	fgSizer31->Add( checkBox_TerminateComps, 0, wxALL, 5 );
	
	m_panel12->SetSizer( fgSizer31 );
	m_panel12->Layout();
	fgSizer31->Fit( m_panel12 );
	m_notebook3->AddPage( m_panel12, wxT("Components"), true );
	
	bSizer21->Add( m_notebook3, 1, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer22;
	bSizer22 = new wxBoxSizer( wxHORIZONTAL );
	
	button_OK = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer22->Add( button_OK, 0, wxALL, 5 );
	
	button_Cancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer22->Add( button_Cancel, 0, wxALL, 5 );
	
	bSizer21->Add( bSizer22, 0, wxEXPAND, 5 );
	
	this->SetSizer( bSizer21 );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( SettingsFrame::OnActivate ) );
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SettingsFrame::OnClose ) );
	button_OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SettingsFrame::OnOK ), NULL, this );
	button_Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SettingsFrame::OnCancel ), NULL, this );
}
